package org.zk.dubbo_provider.service.impl;



import org.zk.dubbo_provider.dao.LikeMapper;
import org.zk.entity.Like;
import org.zk.service.LikeService;
import com.alibaba.dubbo.config.annotation.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Alicelonely
 * @since 2019-12-11
 */
@Service(timeout = 10000)
public class LikeServiceImpl   implements LikeService {

    @Resource
    LikeMapper likeMapper;
     //根据用户Id查询收藏
    @Override
    public List<Like> getLikeId(int userId) {
        return likeMapper.getLikeId(userId);
    }

    @Override
    public void addLike(Like like) {
         likeMapper.addLike(like);
    }

    @Override
    public void delLike(int likeId) {
         likeMapper.delLike(likeId);
    }
}
